#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>

#define N 1000

int main()
{
	int n = 0;
	scanf("%d", &n);

	int before = 0, after = 0;
	int i = 0;
	int order = 0;
	int sum = 0;
	for (i = 1; i <= n; i++)
	{
		scanf("%d", &after);
		order = after - before;

		if (order < 0)
		{
			sum += (-1 * order) * 4 + 5;
			before = after;
		}
		else if (order == 0)
		{
			sum += 5;
			before = after;
		}
		else
		{
			sum += order * 6 + 5;
			before = after;
		}
	}
	printf("%d", sum);
}

